/**
 * Created by 周翔 on 2017/5/8.
 */
import http from '../../../common/httpUtil';
import * as types from './fundInfoMutationTypes';

const actions = {
  querySysFundInfo ({ commit }, {pageIndex = 1, pageSize = 10} = {}) {
    commit(types.FUND_INFO_QUERY_BEGIN);
    return http.get(`sys/fund/info?pageIndex=${pageIndex}&pageSize=${pageSize}`).then(fundInfo => {
      console.log(fundInfo)
      commit(types.FUND_INFO_QUERY_SUC, {fundInfo});
    })
  },
  querySysFundInfoCount ({ commit }) {
    commit(types.FUND_INFO_QUERY_COUNT_BEGIN);
    return http.get(`sys/fund/count`)
      .then(totalCount => {
        commit(types.FUND_INFO_QUERY_COUNT_SUC, {totalCount});
      })
  }
}


export default actions;

